function t_initZoom(){$('[data-zoomable="yes"]').length&&(window.tzoominited=!0,$('[data-zoomable="yes"]').addClass("t-zoomable"),$("body").append('
'),t_showZoom(),$(".t-zoomer__close, .t-zoomer__bg").click(function(o){$("body").removeClass("t-zoomer__show"),$("body").removeClass("t-zoomer__show_fixed"),$(document).unbind("keydown")}))}function t_showZoom(){$(".t-records").on("click",".t-zoomable",function(o){$("body").addClass("t-zoomer__show"),$(".t-zoomer__container").html('');var e=$(this).closest(".r").attr("id"),s=$("#"+e).find(".t-zoomable");$("#"+e).find(".t-slds").length&&(s=$(this).closest(".t-slds").find(".t-zoomable"));s.each(function(){var o=$(this).attr("data-img-zoom-url").split(",");if($(this).is("img"))var e=$(this).attr("title"),s=$(this).attr("data-img-zoom-descr");if($(this).is("div"))e=$(this).attr("title"),s=$(this).attr("data-img-zoom-descr");if(void 0!==e&&!1!==e)var _=''+e+"
";else _="";if(void 0!==s&&!1!==s)var t=''+s+"
";else t="";$(".t-carousel__zoomer__inner").append('")}),$(".t-carousel__zoomer__item").each(function(){$(this).css("display","block");var o=$(this).find(".t-zoomer__comments"),e=o.find(".t-zoomer__title"),s=o.find(".t-zoomer__descr");e.length||s.length||o.css("padding","0");var _=o.innerHeight();$(this).css("display",""),$(this).find(".t-carousel__zoomer__wrapper").css("bottom",_)});var _,t=$(this).attr("data-img-zoom-url"),r=$('.t-carousel__zoomer__img[src="'+t+'"]'),i=$(".t-carousel__zoomer__item");r.closest(i).show(0),i.each(function(){$(this).attr("data-zoomer-slide-number",$(this).index())}),pos=parseFloat($(".t-carousel__zoomer__item:visible").attr("data-zoomer-slide-number")),$(".t-carousel__zoomer__control_right").click(function(){pos=(pos+1)%i.length,i.hide(0).eq(pos).show(0)}),$(".t-carousel__zoomer__control_left").click(function(){pos=(pos-1)%i.length,i.hide(0).eq(pos).show(0)}),$(document).keydown(function(o){37==o.keyCode&&(pos=(pos-1)%i.length,i.hide(0).eq(pos).show(0)),39==o.keyCode&&(pos=(pos+1)%i.length,i.hide(0).eq(pos).show(0)),27==o.keyCode&&($("body").removeClass("t-zoomer__show"),$("body").removeClass("t-zoomer__show_fixed"),$(document).unbind("keydown"))}),$(".t-carousel__zoomer__inner").bind("touchstart",function(o){_=o.originalEvent.touches[0].clientX}),$(".t-carousel__zoomer__inner").bind("touchend",function(o){var e=o.originalEvent.changedTouches[0].clientX;e+50<_?(pos=(pos-1)%i.length,i.hide(0).eq(pos).show(0)):_